const { expect } = require("chai");
const { ethers } = require("hardhat");

describe("ChangerMachine", function () {
    it("ChangerMachine test", async function () {
        const ChangerMachine = await ethers.getContractFactory("ChangerMachine");
        const changerMachine = await ChangerMachine.deploy("0x3886949F10238a57E9fc929ce696d96271733023", ["0x256EAc5e66d8B84e27461366C32fd2f4b4fF76e7","0x2D90A171c62A0D2033d3aED05a1DF2AEd2815E5b"], ["20","40"]);
        await changerMachine.deployed();
        console.log("address: ", await changerMachine.address);

        await changerMachine.addPersonsPayee("0xf57194cf32ea60d9f69EC1B15067c3A867252FdC", 90);
        await changerMachine.addDistributors("0xf57194cf32ea60d9f69EC1B15067c3A867252FdC", ["0x66860C234e2D498e8A4E02e8e19BaA593Bc64301"]);

        await changerMachine.splitAccount(1001, 1, "0x66860C234e2D498e8A4E02e8e19BaA593Bc64301");

        // await greeter.transfer(greeter.address, 20);
        // console.log("balance1: ", await greeter.balanceOf(greeter.address));
        // console.log("balance1: ", await greeter.balanceOfOwner());
        // let addr = "0x256EAc5e66d8B84e27461366C32fd2f4b4fF76e7";
        // await greeter.deposit(addr);
        // console.log("balance2: ", await greeter.balanceOf(addr));
        // console.log("balance2: ", await greeter.balanceOfOwner());
    });
});
